Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix slow scrolling on firefox and on windows with 'one screen at a time' #68

Merged
merged 1 commit into from
Apr 23, 2020
Merged

Conversation

jonenst
Copy link
Contributor

@jonenst jonenst commented Apr 23, 2020

See #67

@jonenst
Copy link
Contributor Author

jonenst commented Apr 23, 2020

I went ahead and also fixed the deltamodeScreen because it's simple. I tested all modes on windows and linux with chrome and firefox

@jonenst
Copy link
Contributor Author

jonenst commented Apr 23, 2020

Also while writing this patch, I noticed that the line

// touchpads can give ev.deltaY == 0, which skrews the lvl calculation
if (ev.deltaY === 0) return

is no longer necessary (the new formula doesn't divide by zero in this case, it keeps the same zoom level), do you want me to remove it in another PR ? it simplifies the code and makes its behavior more homogeneous

@Fuzzyma Fuzzyma merged commit ec55d15 into svgdotjs:master Apr 23, 2020
@Fuzzyma
Copy link
Member

Fuzzyma commented Apr 23, 2020

Nice code and comment :)

do you want me to remove it in another PR

Yes please - that line can go

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants